<template>
  <div class="nav">
    <input
      @keydown.enter="$emit('enter')"
      placeholder="请输入你的心愿"
      @input="inputHandle"
      :value="value"
      type="text"
      :focus="focus"
    />
  </div>
</template>

<script>
export default {
  props: {
    value: String,
    focus: Boolean,
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {
    inputHandle(e) {
      this.$emit("input", e.target.value);
    },
  },
  components: {},
};
</script>

<style lang="scss" scoped>
.nav {
  width: 100%;
  height: 40px;
  padding: 5px 3.75rem;
  box-sizing: border-box;
  margin-top: 3.375rem;
  input {
    width: 100%;
    height: 100%;
  }
}
</style>
